<?php
/**
 * 导航类，头部导航管理类
 * @author jianhui
 *
 */
class Navbar{
    var $user = null;
    var $menuList = array();
    /**
     * 构造函数
     * @param array $user
     */
    function Navbar($user){
        $this->user = $user;
    }
    /**
     * 获取菜单列表
     */
    function getNavbarList(){
        if ($this->user['userRole'] == 1){
            //来店管控
            $this->menuList[] = array('ReachStore','storeList','title'=>'来店管控');
            //红黑榜
            $this->menuList[] = array('ReachStore', 'topList', 'title'=>'发布全国红黑榜');
            //执行反馈
            $this->menuList[] = array('StorePro', 'index', 'title'=>'执行反馈');
        }else{
            //来电管控
            $this->menuList[] = array('ReachStore','adminList','title'=>'来店管控管理');
            //红黑版
            $this->menuList[] = array('ReachStore', 'topList', 'title'=>'发布全国红黑榜管理');
            //执行反馈管理
            $this->menuList[] = array('AdminPro', 'index', 'title'=>'执行反馈管理');
            //报表导出
            $this->menuList[] = array('Report', 'index', 'title'=>'报表管理');
            //总部端
            if ($this->user['userRole'] == 6){
                $this->menuList[] = array('AdminProType', 'index', 'title'=>'平台管理','child'=>array(
                        array('Import','index','title'=>'数据导入','childFocus'=>array(
                            'Import_index','Import_reachWeek','Import_reachStandard','Import_reachTimeUnit'
                        )),
                        array('AdminProType','index','title'=>'项目类型管理','childFocus'=>array(
                            'AdminProType_index',
                        )),
                        array('Admin','timeUnitList','title'=>'周管理','childFocus'=>array(
                            'Admin_timeUnitList',
                        )),
                    ));
            }
        }
        return $this->menuList;
    }
}